﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MaterialRequisitionDetailEdit.aspx.cs" Inherits="DuJianliang.ApplicationPlatform.Proj5715.MaterialRequisition.MaterialRequisitionDetailEdit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Expires" content="0" /> 
    <meta http-equiv="Cache-Control" content="no-cache" /> 
    <meta http-equiv="Pragma" content="no-cache" />
    <title></title>
    <base target="_self" />
    <style type="text/css">
        #editTable
        {
            background-color: #000000;            
        }
        #editTable td
        {
            background-color: #ffffff;
            padding: 10px 10px 10px 10px;
        }
    </style>
    <script type="text/javascript">
        function showPage1() {
            var retValue = window.showModalDialog(encodeURI("SelectItemCode.aspx"), "", "dialogWidth=800px;dialogHeight=600px");
            if (retValue != "" && typeof (retValue) != "undefined") {
                var retValues = retValue.split('|');
                document.getElementById('txt_MaterialCode').value = retValues[0];
                document.getElementById('hidMaterialCode').value = retValues[0];
                document.getElementById('txt_MaterialName').value = retValues[1];
                document.getElementById('hidMaterialName').value = retValues[1];
                document.getElementById('txt_MaterialUnit').value = retValues[2];
                document.getElementById('hidMaterialUnit').value = retValues[2];
            }
        }
        function showPage2() {
            var retValue = window.showModalDialog(encodeURI("SelectDispatch.aspx"), "", "dialogWidth=800px;dialogHeight=600px");
            if (retValue != "" && typeof (retValue) != "undefined") {
                var retValues = retValue.split('|');
                document.getElementById('hidDispatchID').value = retValues[0];
                document.getElementById('txt_DispatchCode').value = retValues[1];
                document.getElementById('hidDispatchCode').value = retValues[1]; 
            }
        }
        function showPage3() {
            var url = "SelectDispatchMissile.aspx?DispatchID=" + document.getElementById('hidDispatchID').value
            var retValue = window.showModalDialog(encodeURI(url), "", "dialogWidth=800px;dialogHeight=600px");
            if (retValue != "" && typeof (retValue) != "undefined") {
                var retValues = retValue.split('|');
                document.getElementById('hidDispatchMissileID').value = retValues[0];
                document.getElementById('txtMissileCode').value = retValues[1];
                document.getElementById('hidMissileCode').value = retValues[1];
            }
        }
        function showPage4() {
            var url = "SelectDispatchMissileProcess.aspx?DispatchMissileID=" + document.getElementById('hidDispatchMissileID').value
            var retValue = window.showModalDialog(encodeURI(url), "", "dialogWidth=800px;dialogHeight=600px");
            if (retValue != "" && typeof (retValue) != "undefined") {
                document.getElementById('hidProcessSortNumber').value = retValue
                document.getElementById('txtProcessSortNumber').value = retValue
            }
        }
    </script>  
</head>
<body style="font-size:12px">
    <form id="form1" runat="server">
    <div>
    <table id="editTable" width="600px" border="0" cellpadding="0" cellspacing="1" align="center">
      <tr>
        <td width="150px">物料名称</td>
        <td> 
            <asp:TextBox ID="txt_MaterialCode" runat="server" Width="300px" ReadOnly="True"></asp:TextBox>
            <input id="Button1" type="button" value="选择" onclick="showPage1()" />
            <asp:HiddenField ID="hidMaterialCode" runat="server" />
        </td>
      </tr>
      <tr>
        <td>规格</td>
        <td><asp:TextBox ID="txt_MaterialName" runat="server" Width="300px" ReadOnly="True"></asp:TextBox>
            <asp:HiddenField ID="hidMaterialName" runat="server" />
          </td>
      </tr>
            <tr>
        <td>单位</td>
        <td><asp:TextBox ID="txt_MaterialUnit" runat="server" Width="300px" ReadOnly="True"></asp:TextBox>
            <asp:HiddenField ID="hidMaterialUnit" runat="server" />
          </td>
      </tr>
      <tr>
        <td>派工单号</td>
        <td>
        <asp:TextBox ID="txt_DispatchCode" runat="server" Width="300px" ReadOnly="True"></asp:TextBox>
        <input id="Button2" type="button" value="选择" onclick="showPage2()" />
        <asp:HiddenField ID="hidDispatchID" runat="server" />
        <asp:HiddenField ID="hidDispatchCode" runat="server" />
          </td>
      </tr>
      <tr>
        <td>导弹号</td>
        <td>
        <asp:TextBox ID="txtMissileCode" runat="server" Width="300px" ReadOnly="True"></asp:TextBox>
        <input id="Button3" type="button" value="选择" onclick="showPage3()" />
        <asp:HiddenField ID="hidDispatchMissileID" runat="server" />
        <asp:HiddenField ID="hidMissileCode" runat="server" />
        </td>
      </tr>
      <tr>
        <td>工序号</td>
        <td>
          <asp:TextBox ID="txtProcessSortNumber" runat="server" Width="300px" ReadOnly="True"></asp:TextBox>
          <input id="Button4" type="button" value="选择" onclick="showPage4()" />
          <asp:HiddenField ID="hidProcessSortNumber" runat="server" />
        </td>
      </tr>
      <tr>
        <td>领料类型</td>
        <td>
            <asp:TextBox ID="txtMRType" runat="server" Width="300px"></asp:TextBox>
        </td>
      </tr>
      <tr>
        <td>数量</td>
        <td> 
            <asp:TextBox ID="txt_Num" runat="server" Width="300px"></asp:TextBox>
        </td>
      </tr>
      <tr>
        <td>单价</td>
        <td>
            <asp:TextBox ID="txt_UnitCost" runat="server" Width="300px"></asp:TextBox>
        </td>
      </tr>
      <tr>
        <td>金额</td>
        <td>
            <asp:TextBox ID="txt_Cost" runat="server" Width="300px"></asp:TextBox>
        </td>
      </tr>
      <tr>
        <td>用途</td>
        <td>
            <asp:TextBox ID="txt_Purpose" runat="server" Width="300px"></asp:TextBox>
        </td>
      </tr>
      <tr>
        <td>备注</td>
        <td>
            <asp:TextBox ID="txt_Remark" runat="server" Width="300px"></asp:TextBox>
        </td>
      </tr>
      <tr>
        <td colspan="2" align="center">
            <asp:Button ID="btnOK" runat="server" Text="确定" Width="60px" 
                onclick="btnOK_Click" />
            &nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Button ID="btnCancel" runat="server" Text="取消" Width="60px" 
                onclick="btnCancel_Click" CausesValidation="False" />
            </td>        
      </tr>
    </table>
    </div>
    </form>
</body>
</html>
